"use client"

import {useAppContext} from "@/components/AppContext";
import Menu from "@/components/Chat/Main/Menu";
import Welcome from "@/components/Chat/Main/Welcome";
import MessageList from "@/components/Chat/Main/MessageList";
import ChatInput from "@/components/Chat/Main/ChatInput";

export default function Main() {
  const {
    state: { selectedChat }
  } = useAppContext()
  return (
    <div className='flex-1 relative'>
      <main className='overflow-y-auto w-full h-full bg-white text-gray-900 dark:bg-gray-800 dark:text-gray-100'>
        {/*<Menu />*/}
        {!selectedChat && <Welcome />}
        <MessageList/>
        <ChatInput/>
      </main>
    </div>
  )
}
